package com.janke.softballnexus.client;

import java.util.List;

import com.google.common.collect.Lists;
import com.google.gwt.core.client.GWT;
import com.google.gwt.event.shared.EventBus;
import com.google.gwt.event.shared.SimpleEventBus;
import com.janke.softballnexus.shared.DivisionProxy;

public class BagOfState {

	private static BagOfState ref = null;

	private final List<DivisionProxy> allDivisions = Lists.newArrayList();

	public List<DivisionProxy> getAllDivisions() {
		return allDivisions;
	}

	private BagOfState() {

	}

	public static BagOfState getInstance() {
		if (ref == null) {
			ref = new BagOfState();
		}
		return ref;
	}

	private EventBus clientEventBus = (SimpleEventBus) GWT
			.create(SimpleEventBus.class);

	public EventBus getClientEventBus() {
		return clientEventBus;
	}

}
